package dao;

import db.Connect;

import java.sql.*;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 02.10.13
 * Time: 17:54
 * To change this template use File | Settings | File Templates.
 */
public class main {

    private static Connection connection;
    private static String url;
    private static boolean isConnected = false;
    private static String user;
    private static String password;

    public static void main(String[] args) throws ClassNotFoundException, SQLException {

        connection= Connect.getConnect() ;
        try{

            Statement stmt = connection.createStatement();
            ResultSet rset = stmt.executeQuery("SELECT user_login FROM users");
            // Print the name out
            while (rset.next())
                System.out.println(rset.getString(1));

            //close the result set, statement, and the connection
            rset.close();
            stmt.close();
        }catch (SQLException e){
            System.out.println(e);
        }


    }



}
